package b1.conifg
{
	import b1.players.*;

	public class EquipConfig extends ObjectConfig
	{
		//本身作用
		public var addSpeed:int;
		public var addIntelligence:int;
		public var addHealthPoint:int;
		public var addVitalityPoint:int;
		
		//整体套装附加作用
		public var wholeEquipDescription:String;
		public var addSpeedWhole:int;
		public var addIntelligenceWhole:int;
		public var addHealthPointWhole:int;
		public var addVitalityPointWhole:int;
		
		//部位：0, 头; 1, 眼睛; 2, 背部; 3, 脚;
		public var position:int;
		//套装编号，同一套装有共同的编号
		public var equipType:int;
		//同一套装的总数
		public var equipNum:int;
		//耐久度
		public var durability:int;
		//套装颜色 0表示白色 1 表示绿色 2表示蓝色 3表示紫色
		public var color:int;
		//套装品质（颜色）增加的额外属性
		public var colorAddSpeed:int;
		public var colorAddIntelligence:int;
		public var colorAddHealthPoint:int;
		public var colorAddVitalityPoint:int;
		//品质（颜色）描述
		public var colorDescribe:String;
		//品质（颜色）所基于的基础装备索引
		public var baseIndex:int;
		//后续品质（颜色）所对应的索引集合
		public var colorIndexes:Object;
		//魔法索引
		public var magicIndex:int;
		//整装魔法索引
		public var wholeMagicIndex:int;
		
		public function EquipConfig(objectXML:XML)
		{
			super(objectXML);
			
			addSpeed = parseInt(objectXML.addSpeed);
			addIntelligence = parseInt(objectXML.addIntelligence);
			addHealthPoint = parseInt(objectXML.addHealthPoint);
			addVitalityPoint = parseInt(objectXML.addVitalityPoint);
			
			wholeEquipDescription = objectXML.wholeEquipDescription;
			addSpeedWhole = parseInt(objectXML.addSpeedWhole);
			addIntelligenceWhole = parseInt(objectXML.addIntelligenceWhole);
			addHealthPointWhole = parseInt(objectXML.addHealthPointWhole);
			addVitalityPointWhole = parseInt(objectXML.addVitalityPointWhole);

			position = parseInt(objectXML.position);
			equipType = parseInt(objectXML.equipType);
			equipNum = parseInt(objectXML.equipNum);
			durability = parseInt(objectXML.durability);
			
			magicIndex = parseInt(objectXML.magicIndex);
			wholeMagicIndex = parseInt(objectXML.wholeMagicIndex);

			baseIndex = -1;
			colorIndexes = new Object();
			colorIndexes[0] = index;
		}
		
	}
}